class MyStack:

    def __init__(self):
        """
        Initialize your data structure here.
        """
        self.queue = []

    def push(self, x: int) -> None:
        """
        Push element x onto stack.
        """
        tmp = []
        while self.queue:
            tmp.append(self.queue.pop(0))
        self.queue.append(x)
        while tmp:
            self.queue.append(tmp.pop(0))


    def pop(self) -> int:
        """
        Removes the element on top of the stack and returns that element.
        """
        return self.queue.pop(0)

    def top(self) -> int:
        """
        Get the top element.
        """
        return self.queue[0]

    def empty(self) -> bool:
        """
        Returns whether the stack is empty.
        """
        return len(self.queue) == 0


if __name__ == '__main__':
    # Your MyStack object will be instantiated and called as such:
    obj = MyStack()
    obj.push(10)
    param_3 = obj.top()
    param_2 = obj.pop()

    param_4 = obj.empty()
    print(param_2, param_3, param_4)
